/* 订单页面样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header h1 {
    color: #333;
    font-size: 28px;
    margin: 0;
}

.page-header h1 i {
    color: #ff6b35;
    margin-right: 10px;
}

.order-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.filter-btn.active {
    background: #ff6b35;
    border-color: #ff6b35;
    color: white;
}

.orders-container {
    min-height: 400px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.order-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-number {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.order-date {
    color: #666;
    font-size: 14px;
}

.order-distance {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #007bff;
    font-size: 13px;
    margin-left: 10px;
    padding: 3px 8px;
    background: #e7f3ff;
    border-radius: 12px;
}

.order-distance i {
    font-size: 12px;
}

.order-status .status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-processing {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-shipped {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.order-items {
    margin-bottom: 15px;
}

.order-item-product {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.order-item-product:last-child {
    border-bottom: none;
}

.product-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0 0 5px 0;
}

.product-specs {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.product-total {
    font-size: 16px;
    font-weight: 600;
    color: #ff6b35;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.order-total {
    display: flex;
    align-items: center;
    gap: 10px;
}

.total-label {
    font-size: 16px;
    color: #666;
}

.total-amount {
    font-size: 20px;
    font-weight: 600;
    color: #ff6b35;
}

.order-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #ff6b35;
    color: white;
}

.btn-primary:hover {
    background: #e55a2b;
}

.btn-outline {
    background: white;
    color: #ff6b35;
    border: 1px solid #ff6b35;
}

.btn-outline:hover {
    background: #ff6b35;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* 订单详情模态框 */
.order-detail {
    max-height: 70vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-section h3 {
    color: #333;
    font-size: 18px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b35;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-row .label {
    font-weight: 500;
    color: #666;
}

.detail-row .value {
    color: #333;
}

.address-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #ff6b35;
}

.address-info p {
    margin: 0 0 5px 0;
}

.address-info p:last-child {
    margin-bottom: 0;
}

/* 物流信息样式 */
.logistics-info {
    background: #f0f7ff;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.logistics-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.logistics-row:last-child {
    border-bottom: none;
}

.logistics-row .label {
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logistics-row .label i {
    color: #007bff;
    width: 16px;
    text-align: center;
}

.logistics-row .value {
    color: #333;
    font-weight: 500;
}

.logistics-row.error {
    color: #dc3545;
}

.logistics-row.error .label,
.logistics-row.error .value {
    color: #dc3545;
}

.logistics-row.error .label i {
    color: #dc3545;
}

.logistics-addresses {
    display: flex;
    flex-direction: column;
    text-align: right;
    max-width: 60%;
}

.logistics-addresses div {
    word-break: break-word;
    text-align: right;
}

.order-items-detail {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item-detail {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.order-item-detail .product-image {
    width: 80px;
    height: 80px;
    margin-right: 20px;
}

.order-item-detail .product-info h4 {
    font-size: 16px;
    margin: 0 0 8px 0;
}

.order-item-detail .product-specs {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.order-item-detail .product-total {
    font-size: 18px;
    font-weight: 600;
    color: #ff6b35;
}

.cost-breakdown {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.cost-row.total {
    border-top: 2px solid #ff6b35;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: 600;
}

.cost-row .label {
    color: #666;
}

.cost-row .value {
    color: #333;
    font-weight: 500;
}

.cost-row .value.discount {
    color: #28a745;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #333;
}

.empty-state p {
    font-size: 16px;
    margin: 0 0 30px 0;
}

/* 加载状态 */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-state i {
    font-size: 32px;
    color: #ff6b35;
    margin-bottom: 15px;
}

.loading-state p {
    font-size: 16px;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .order-filters {
        flex-wrap: wrap;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .order-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .order-item-product {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .product-image {
        width: 100%;
        height: 120px;
        margin-right: 0;
    }
    
    .product-info {
        width: 100%;
    }
    
    .product-total {
        align-self: flex-end;
    }
}
